package com.imooc.pojo;

import com.baomidou.mybatisplus.annotation.*;
import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.ToString;

/**
 * 
 * 
 * @author yukangkang
 * @email 1304473884@qq.com
 * @date 2021-01-16 21:20:11
 */
@Data
@ToString
@TableName("stu")
public class Stu implements Serializable {
	private static final long serialVersionUID = 1L;

		/**
		 * 
		 */
		@TableId(value = ID, type = IdType.AUTO)
		private Integer id;
		/**
		 * 
		 */
		@TableField(NAME)
		private String name;
		/**
		 * 
		 */
		@TableField(AGE)
		private Integer age;




	public final static String ID =  "`id`";
	public final static String NAME =  "`name`";
	public final static String AGE =  "`age`";


	public final static String ID_COMMENT =  "";
	public final static String NAME_COMMENT =  "";
	public final static String AGE_COMMENT =  "";


	public static Stu of(Object obj) {
		Stu e = new Stu();
		BeanUtils.copyProperties(obj, e);
		return e;
	}

	public static QueryWrapper<Stu> queryWrapper(Object obj) {
		return new QueryWrapper<>(of(obj));
	}



}
